import numpy as np
def get_rss_by_ray_tracing(room_x = 20,
                           room_y = 15,
                           room_z = 4,
                           source_x = 10,
                           source_y = 7.5,
                           source_z = 1,
                           grid_size = 0.1,
                           f = 2400):
    # 射线跟踪、输入房间大小、信号源坐标、
    # 网格大小、信号频率、输出每个网格上接受的信号强度
    room_x = 1000 * room_x
    room_y = 1000 * room_y
    room_z = 1000 * room_z
    source_x = 1000 * source_x
    source_y = 1000 * source_y
    source_z = 1000 * source_z
    grid_size = 1000 * grid_size

    # 复数介电常数、导电系数、j表示虚数
    epsilon_c = 10 - 1.2j
    epsilon_w = 6.2 - 1.2j

    # if room_x * room_y / grid_size * grid_size > 10000000:
    #     print('大矩阵同时计算所有网格节点的信号强度，可能导致内存不足')
    #     return
    T = 1 / (f * pow(10,6))
    c = 3.0e8
    lamd = c / (f * pow(10,6))
    # x = np.array([i for i in range(1,int(room_x-grid_size))])
    # y = np.array([grid_size,room_y-grid_size])
    x = np.arange(int(room_x-grid_size))
    y = np.arange(int(room_y-grid_size))
    [x,y] = np.meshgrid()
    x , y = np.meshgrid(x,y)
    print(x,y)
    L = [x[:], y[:]]
    L = [L, np.zeros(len(x[:])) + source_z]


if __name__ == '__main__':
    get_rss_by_ray_tracing()

